public class Test15 {
    public static void main(String[] args) {
        String str = "asc sdvetwrw ACSDEEQ3WE";

        int countOfVowels = 0;
        int countOfSpace = 0;

        for (int i = 0 ; i < str.length(); i++) {
            char ch = str.charAt(i);
            if (ch == 'a' || ch == 'A'|| ch == 'e' || ch == 'E'|| ch == 'i' || ch == 'I'|| ch == 'o' || ch == 'O'|| ch == 'u' || ch == 'U') {
                countOfVowels++;
            } else if (ch == ' ') {
                countOfSpace++;
            }
        }

        System.out.println("元音字符: " + countOfVowels);
        System.out.println("空格: " + countOfSpace);
    }
}
